package com.briup.es.config.exception;

import com.briup.es.config.response.ResultCode;
import lombok.Getter;

public class ServiceException extends RuntimeException{
    @Getter
    private final Integer code;

    public ServiceException(String message){
        this(500,message);
    }

    public ServiceException(Integer code,String message){
        super(message);
        this.code =code;
    }

    public ServiceException(ResultCode resultCode){
        this(resultCode.getCode(), resultCode.getMessage());
    }
}
